(function(B,A){A.ui=A.ui||{};
A.ui.Base=function(F,E,D){this.namespace="."+A.Event.createNamespace(this.name,F);
C.constructor.call(this,F);
this.options=B.extend(this.options,D,E);
this.attachToDom();
this.__bindEventHandlers()
};
A.BaseComponent.extend(A.ui.Base);
var C=A.ui.Base.$super;
B.extend(A.ui.Base.prototype,{__bindEventHandlers:function(){},destroy:function(){A.Event.unbindById(this.id,this.namespace);
C.destroy.call(this)
}})
})(jQuery,window.RichFaces||(window.RichFaces={}));
(function(D,B){B.ui.Message=function(I,H){F.constructor.call(this,I,H,A)
};
B.ui.Base.extend(B.ui.Message);
var F=B.ui.Message.$super;
var A={showSummary:true,level:0};
var G=["rf-msg-inf","rf-msg-wrn","rf-msg-err","rf-msg-ftl"];
var E=function(K,H,M){var J=D(B.getDomElement(this.id));
var L=M.sourceId;
var I=M.message;
if(!this.options.forComponentId){if(!I){D(B.getDomElement(this.id+":"+L)).remove()
}else{C.call(this,L,I)
}}else{if(this.options.forComponentId===L){J.empty();
C.call(this,L,I)
}}};
var C=function(H,J){if(J&&J.severity>=this.options.level){var I=D(B.getDomElement(this.id));
var K="<span class='"+G[J.severity]+"' id='"+this.id+":"+H+"'";
if(J.summary){if(this.options.tooltip){K=K+" title='"+J.summary+"'>"
}else{if(this.options.showSummary){K=K+"><span class='rf-msg-sum'>"+J.summary+"</span>"
}else{K=K+">"
}}}else{K=K+">"
}if(this.options.showDetail&&J.detail){K=K+"<span class='rf-msg-dtl'>"+J.detail+"</span>"
}K=K+"</span>";
I.append(K)
}};
D.extend(B.ui.Message.prototype,{name:"Message",__bindEventHandlers:function(){B.Event.bind(window.document,B.Event.MESSAGE_EVENT_TYPE+this.namespace,E,this)
}})
})(jQuery,window.RichFaces||(window.RichFaces={}));